package com.fqxiny.picture.model.enums;

import lombok.Getter;

@Getter
public enum PictureEditActionEnum {
    ZOOM_IN("放大操作","ZOOM_IN"),
    ZOOM_OUT("缩小操作","ZOOM_OUT"),
    ROTATE_LEFT("左旋操作","ROTATE_LEFT"),
    ROTATE_RIGHT("右旋操作","ROTATE_RIGHT");

    private final String test;
    private final String value;


    PictureEditActionEnum(String test, String value) {
        this.test = test;
        this.value = value;
    }

    public static PictureEditActionEnum getEnumByValue(String value){
        if(value == null || value.isEmpty()){
            return null;
        }

        for (PictureEditActionEnum pictureEditActionEnum : PictureEditActionEnum.values()) {
            if(pictureEditActionEnum.value.equals(value)){
                return pictureEditActionEnum;
            }
        }
        return null;
    }
}
